package com.yuju.order.enums;

/**
 * 
 * 类名：hotelReturnCodeEnum  <br />
 *
 * 功能：功能：酒店业务代码枚举
 *
 * @author : sunyl <br />
 * @Date : 2017年11月23日 上午10:40:51  <br />
 * @version : 1.1 <br />
 */
public enum RoomOrderReturnCodeEnum {
	ROOM_ORDER_QUERY_SUCCESS("yuju-room-order-1000", "入住订单信息查询成功"),
	ROOM_ORDER_QUERY_FAILURE("yuju-room-order-1001", "入住订单信息查询失败"),
	ROOM_ORDER_SAVE_SUCCESS("yuju-room-order-1002", "入住订单信息保存成功"),
	ROOM_ORDER_SAVE_FAILURE("yuju-room-order-1003", "入住订单信息保存失败"),
	ROOM_ORDER_UPDATE_SUCCESS("yuju-room-order-1004", "入住订单信息更新成功"),
	ROOM_ORDER_UPDATE_FAILURE("yuju-room-order-1005", "入住订单信息更新失败"),
	ROOM_ORDER_DEL_SUCCESS("yuju-room-order-1006", "入住订单信息删除成功"),
	ROOM_ORDER_DEL_FAILURE("yuju-room-order-1007", "入住订单信息删除失败"),
	ROOM_ORDER_UPDTAERESERVE_SUCCESS("yuju-room-order-1008", "预定信息更新成功"),
	ROOM_ORDER_UPDTAERESERVE_FAILURE("yuju-room-order-1009", "预定信息更新失败"),
	ROOM_ORDER_QUERY_RELA_FAILURE("yuju-room-order-1010", "入住订单不存在关联订单"),
	ROOM_ORDER_UPDATE_PRICE_SUCCESS("yuju-room-order-1011", "入住订单价格更新成功"),
	ROOM_ORDER_UPDATE_PRICE_FAILURE("yuju-room-order-1012", "入住订单价格更新失败"),
	ROOM_ORDER_UPDATE_ROOM_SUCCESS("yuju-room-order-1013", "入住订单房间更新成功"),
	ROOM_ORDER_UPDATE_ROOM_FAILURE("yuju-room-order-1014", "入住订单房间更新失败"),
	ROOM_ORDER_ROOM_QUIT_SUCCESS("yuju-room-order-1015", "退出联房成功"),
	ROOM_ORDER_ROOM_QUIT_FAILURE("yuju-room-order-1016", "退出联房失败"),
	ROOM_ORDER_ROOM_JOIN_SUCCESS("yuju-room-order-1017", "加入联房成功"),
	ROOM_ORDER_ROOM_JOIN_FAILURE("yuju-room-order-1018", "加入联房失败"),
	ROOM_ORDER_ROOM_DISSOLVE_SUCCESS("yuju-room-order-1019", "解散联房成功"),
	ROOM_ORDER_ROOM_DISSOLVE_FAILURE("yuju-room-order-1020", "解散联房失败"),
	ROOM_ORDER_UPDATE_DUMP_SUCCESS("yuju-room-order-1021", "哑房订单信息更新成功"),
	ROOM_ORDER_UPDATE_DUMP_FAILURE("yuju-room-order-1022", "哑房订单信息更新失败"),
	ROOM_ORDER_SAVE_DUMP_SUCCESS("yuju-room-order-1023", "哑房订单信息更新成功"),
	ROOM_ORDER_SAVE_DUMP_FAILURE("yuju-room-order-1024", "哑房订单信息更新失败"),
	ROOM_ORDER_UPDATE_CHECKOURT_SUCCESS("yuju-room-order-1025", "入住订单离店时间更新成功"),
	ROOM_ORDER_UPDATE_CHECKOURT_FAILURE("yuju-room-order-1026", "入住订单离店时间更新失败"),
	ROOM_ORDER_AVERAGE_AND_ALL_SUCCESS("yuju-room-order-1027", "公寓房日租金和总房费获取成功"),
	ROOM_ORDER_AVERAGE_AND_ALL_FAILURE("yuju-room-order-1028", "公寓房日租金和总房费获取失败"),
	ROOM_ORDER_ROOM_VALID_FAILURE("yuju-room-order-1029", "所选房间房态校验失败"),
	ROOM_ORDER_QUERY_NO_FAILURE("yuju-room-order-1030", "入住订单不存在"),
	ROOM_ORDER_SAVE_ORDER_GUEST_SUCCESS("yuju-room-order-1031", "同来宾客更新成功"),
	ROOM_ORDER_SAVE_ORDER_GUEST_FAILURE("yuju-room-order-1032", "同来宾客更新失败"),
	ORDER_MONTHPRICE_VALID_FAILURE("yuju-room-order-1033", "公寓入住月租金不能为空"),
	ORDER_ROOMPRICE_VALID_FAILURE("yuju-room-order-1034", "短租入住房费不能为空"),
	ROOM_ORDER_UPDATE_MANAGER_SUCCESS("yuju-room-order-1035", "房管状态更新成功"),
	ROOM_ORDER_UPDATE_MANAGER_FAILURE("yuju-room-order-1036", "房管状态更新失败"),
	ROOM_ORDER_OUT_CHAECKIN("yuju-room-order-1037", "所选订单不在入住状态"),
	ROOM_QUIT_OUT_FAIL_FOR_ROOM_MANAGER("yuju-room-order-1038", "退房失败，退房房管状态未关闭");
	
	private String code;
	private String desc;
	
	RoomOrderReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (RoomOrderGuestReturnCodeEnum enume : RoomOrderGuestReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}